<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>button</title>
    <script type="text/javascript">
        window.onload=function () {
            document.getElementById("btn").onclick=function () {
                var str="id:"+document.getElementById("btn").id+","+
                    " type:"+document.getElementById("btn").type;
                document.getElementById("btn").disabled=true;
                document.getElementById("lb1").innerHTML=str;
            }
        }
    </script>
</head>
<body>
<input type="button" value="禁用" id="btn">
<label id="lb1"></label>
</body>
</html>